<template>
  <div class="maininfochange">
    <div style="width:90%;margin: 0 auto;">
      <!-- 修改展示页面 -->
      <div>
        <div v-if="!isSmall">
          <p style="color:#3a3a3a;">
            对以下任意内容变更，请务必上传
            <a class="a-sty" @click="getFileDownload('merchant_imformation_modify')">
              <strong style="color:#1890ff">《商户信息变更申请表》</strong>
            </a>加盖公章的照片，我们将在1个工作日内完成审核，审核通过后变更生效。
            <br />
            <br />
            <span style="color:#a4a4a4">注：以下所有上传资料均需加盖公章，格式支持图片格式JPG、PNG，且每个文件大小不超过{{imageSize}}M</span>
          </p>

          <a-form
            @submit="handleSubmit"
            style="margin-top: 8px;width:80%;margin:0 auto;"
            :form="form"
          >
            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">基本信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">适用于特约商户更名等情况</p>
              </a-col>
            </a-row>
            <a-form-item
              v-bind="formItemLayout"
              help="若修改此项，请重新上传营业执照，并在“其他补充资料”中上传公司更名证明函"
              label="客户名称"
            >
              <a-input
                v-decorator="[
                      'merchantName',
                      {rules: [{ required: true, message: '请输入客户名称' },{
                        
                       }],validateTrigger: 'blur'}
                    ]"
                placeholder="请输入客户名称"
              />
            </a-form-item>
            <a-form-item v-bind="formItemLayout" label="客户简称">
              <a-input
                v-decorator="[
                      'shortName',
                      {rules: [{ required: true, message: '请输入客户简称' },{
                         
                       }],validateTrigger: 'blur'}
                    ]"
                placeholder="请输入客户简称"
              />
            </a-form-item>
            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">经营信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">适用于特约商户更新营业执照等情况，若修改此项，请重新上传营业执照</p>
              </a-col>
            </a-row>
            <!-- <a-form-item v-bind="formItemLayout" label="社会统一信用代码/注册号">
            <a-input v-decorator="[
                      'orgRegisterNo',
                      {rules: [{ required: true, message: '社会统一信用代码/注册号' },{
                         validator: validateOrgRegisterNo,
                       }],validateTrigger: 'blur'}
                    ]" placeholder="请输入社会统一信用代码/注册号" />
            </a-form-item>-->

            <a-form-item v-bind="formItemLayout" help="无注册资本请填写0" label="注册资本">
               <a-input-number style="width: 185px;" :mix="0" :max="999999999" :step="1" :precision="0"  v-decorator="[
                      'orgRegisterPrincipal',
                      {rules: [{ required: true, message: '请输入注册资本' }]}
                    ]"
                placeholder="请输入注册资本"
              />
              <span>&nbsp;万元人民币</span>
            </a-form-item>
            <a-form-item v-bind="formItemLayout" required label="营业期限">
              <div>
                <a-date-picker
                  :disabledDate="disabledStartDate"
                  showTime
                  format="YYYY-MM-DD"
                  :required="true"
                  placeholder="请选择起始日期"
                  @change="startChange"
                  @openChange="handleStartOpenChange"
                  v-decorator="[
                      'startDate',
                      {rules: [{ required: true, message: '请选择证件有效期' }]}
                    ]"
                />&nbsp; 至 &nbsp;
                <a-date-picker
                  :disabledDate="disabledEndDate"
                  showTime
                  format="YYYY-MM-DD"
                  placeholder="请选择截止日期"
                  :open="endOpen"
                  @change="endChange"
                  @openChange="handleEndOpenChange"
                  v-decorator="[
                      'endDate',
                      {rules: [{ required: true, message: '请选择证件有效期' }]}
                    ]"
                />
                <span @click="tolong" style="color:#1890ff;cursor: pointer;">&nbsp; 长期</span>
              </div>
            </a-form-item>
            <!-- ,initialValue:[moment('2016-01-01', dateFormat), moment('2020-01-01', dateFormat)] -->
            <!-- <a-form-item v-bind="formItemLayout" label="主营业务">
            <a-textarea v-decorator="[
                      'mainBusiness',
                      {rules: [{ required: true, message: '请输入主营业务' }]}
                    ]" placeholder="请输入主营业务" :rows="4" />
            </a-form-item>-->
            <a-form-item v-bind="formItemLayout" label="营业执照地址">
              <a-cascader
                class="w-sty"
                v-decorator="[
                      'dobusAddress',
                      {rules: [{ required: true, message: '营业执照地址' }]}
                    ]"
                :options="options"
                @change="onbusiChange"
                notFoundContent="Not found"
                placeholder="请选择营业执照地址"
              />
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="详细地址">
              <a-textarea
                v-decorator="[
                      'busiAddress',
                      {rules: [{ required: true, message: '请输入营业执照详细地址' }]}
                    ]"
                placeholder="请输入营业执照详细地址"
                :rows="2"
              />
            </a-form-item>
            <a-form-item v-bind="formItemLayout" label="营业执照">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload',{rules: [{ required: true, message: '请上传营业执照!' }]}]"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :data="{to}"
                  :fileList="fileList"
                  @preview="handlePreview"
                  @change="handleChange"
                >
                  <div v-if="fileList.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">营业执照</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
                  <img alt="example" style="width: 100%" :src="previewImage" />
                </a-modal>
                <span class="span-sty">营业执照</span>
              </div>
            </a-form-item>

            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">法定代表人信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">适用于特约商户的法定代表人变更，或法定代表人身份证有效期修改，若修改此项，请重新上传法定代表人身份证</p>
              </a-col>
            </a-row>
            <a-form-item v-bind="formItemLayout" help="若修改此项，请重新上传营业执照" label="姓名">
              <a-input
                v-decorator="[
                      'identityName',
                      {rules: [{ required: true, message: '请输入法定代表人姓名' }]}
                    ]"
                placeholder="请输入法定代表人姓名"
                @change="identityNameChange"
              />
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件类型">
              <div>
                <a-select
                  disabled
                  class="width-sty"
                  v-decorator="[
                      'codetype',
                      {rules: [{ required: true, message: '请选择证件类型' }],initialValue: 'legal'}
                    ]"
                >
                  <a-select-option value="legal">身份证</a-select-option>
                  <a-select-option value="lucy">护照</a-select-option>
                  <a-select-option value="disabled">港澳台通行证</a-select-option>
                  <a-select-option value="Yiminghe">军官证</a-select-option>
                  <a-select-option value="Yiminghe">户口簿</a-select-option>
                </a-select>
              </div>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件号码">
              <a-input
                v-decorator="[
                      'identityNo',
                      {rules: [{ required: true, message: '请输入证件号码' },{
                         validator: validateIdentityNo
                       }],validateTrigger: 'blur'}
                    ]"
                placeholder="请输入证件号码"
              />
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件有效期">
              <a-date-picker
                placeholder="请选择证件有效期"
                @change="dateChange"
                v-decorator="[
                      'expiryDate',
                      {rules: [{ required: true, message: '请选择证件有效期' }]}
                    ]"
              />
            </a-form-item>
            <a-form-item v-bind="formItemLayout" label="法定代表人身份证">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload5',{rules: [{ required: true, message: '请上传身份证正/反面!' }]}]"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList2"
                  @preview="handlePreview2"
                  @change="handleChange2"
                >
                  <div v-if="fileList2.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证正面</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible2" :footer="null" @cancel="handleCancel2">
                  <img alt="example" style="width: 100%" :src="previewImage2" />
                </a-modal>
                <span class="span-sty">人像面</span>
              </div>
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList3"
                  @preview="handlePreview3"
                  @change="handleChange3"
                >
                  <div v-if="fileList3.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证反面</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible3" :footer="null" @cancel="handleCancel3">
                  <img alt="example" style="width: 100%" :src="previewImage3" />
                </a-modal>
                <span class="span-sty">国徽面</span>
              </div>
            </a-form-item>

            <!-- 修改前 -->
            <div v-if="!accountInfo">
              <a-row>
                <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">结算账户信息</a-col>
                <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                  <p class="p-sty">
                    <a @click="goModify" href="javascript:false;void(0);">修改</a>
                  </p>
                </a-col>
              </a-row>
              <a-form-item v-bind="formItemLayout" label="账户类型">
                <span>{{bankCardDTO.isPrivate ? '对私' : '对公'}}</span>
              </a-form-item>
              <a-form-item v-bind="formItemLayout" label="账户名称">
                <span>{{bankCardDTO.accountName}}</span>
              </a-form-item>
              <a-form-item v-bind="formItemLayout" label="开户行名称">
                <span>{{bankCardDTO.bankName}}</span>
              </a-form-item>
              <a-form-item v-bind="formItemLayout" label="开户行所在地">
                <span>{{bankCardDTO.province}}-{{bankCardDTO.city}}</span>
              </a-form-item>
              <a-form-item v-bind="formItemLayout" label="支行名称">
                <span>{{bankCardDTO.bankBranchName}}</span>
              </a-form-item>
              <a-form-item v-bind="formItemLayout" label="账号">
                <span>{{bankCardDTO.cardNo}}</span>
              </a-form-item>
              <a-form-item
                v-bind="formItemLayout"
                label="联系人手机号"
                v-if="this.bankCardDTO.isPrivate == false"
              >
                <span>{{information.mobileNo}}</span>
              </a-form-item>
              <a-form-item
                v-bind="formItemLayout"
                label="预留银行手机号"
                v-if="this.bankCardDTO.isPrivate == true"
              >
                <span>{{bankCardDTO.mobileNo}}</span>
              </a-form-item>
              <a-form-item
                v-bind="formItemLayout"
                label="持卡人身份证"
                v-if="this.bankCardDTO.isPrivate == true && this.information.legalPersonAccount"
              >
                <span>{{idCard}}</span>
              </a-form-item>
              <a-form-item
                v-bind="formItemLayout"
                label="持卡人身份证"
                v-if="this.bankCardDTO.isPrivate && !this.information.legalPersonAccount"
              >
                <span>{{cardHolderIdentityDTO.identityNo}}</span>
              </a-form-item>
            </div>

            <!-- 点击修改后 -->
            <div v-if="accountInfo">
              <a-row>
                <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">结算账户信息</a-col>
                <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                  <p class="p-sty">若修改此项，请重新上传结算银行账户</p>
                </a-col>
              </a-row>

              <a-tabs v-model="tabShow" @change="callback">
                <a-tab-pane tab="对公" key="1">
                  <div v-if="tabShow=='1'" key="tabShow1">
                    <a-form-item v-bind="formItemLayout" label="账户名称">
                      <!-- <span>{{bankCard.accountName}}</span> -->
                      <a-input
                        v-decorator="[
                          'accountName',
                          {rules: [{ required: true, message: '请输入账户名称' }]}
                        ]"
                        placeholder="请输入账户名称"
                      />
                    </a-form-item>
                    <a-form-item v-bind="formItemLayout" label="联系人手机号">
                      <a-input v-decorator="['contactBusMobile']" disabled />
                    </a-form-item>
                  </div>
                </a-tab-pane>

                <!-- 对私(法人) -->

                <a-tab-pane tab="对私(法人)" key="2">
                  <div v-if="tabShow=='2'" key="tabShow2">
                    <a-form-item v-bind="formItemLayout" label="账户名称">
                      <!-- <a-input disabled v-decorator="['accountName']" placeholder="请输入账户名称" /> -->
                      <span>{{bankCard.accountName}}</span>
                    </a-form-item>
                    <a-form-item v-bind="formItemLayout" label="预留银行手机号">
                      <div>
                        <a-input
                          name="phone"
                          placeholder="请输入预留银行手机号"
                          v-decorator="[
                                'PrimobileNo',
                                {
                                 rules: [{ required: true, message: '请输入预留银行手机号!' },{validator: validateCode}],validateTrigger: 'blur'
                                }
                                ]"
                        />
                      </div>
                    </a-form-item>
                    <a-form-item v-bind="formItemLayout" label="持卡人身份证号">
                      <span>{{idCard}}</span>
                    </a-form-item>
                  </div>
                </a-tab-pane>

                <!-- 对私(非法人)forceRender -->
                <a-tab-pane tab="对私(非法人)" key="3">
                  <div v-if="tabShow=='3'" key="tabShow3">
                    <a-form-item v-bind="formItemLayout" label="账户名称">
                      <a-input
                        v-decorator="[
                          'accountName',
                          {rules: [{ required: true, message: '请输入账户名称' }]}
                        ]"
                        placeholder="请输入账户名称"
                      />
                    </a-form-item>
                    <a-form-item v-bind="formItemLayout" label="预留银行手机号">
                      <div>
                        <a-input
                          name="phone"
                          placeholder="请输入预留银行手机号"
                          v-decorator="[
                                'mobileNo',
                                {
                                 rules: [{ required: true, message: '请输入预留银行手机号!' },{validator: validateCode}],validateTrigger: 'blur'
                                }
                                ]"
                        />
                      </div>
                    </a-form-item>
                    <!-- 对私账户显示 -->
                    <a-form-item v-bind="formItemLayout" label="持卡人身份证号">
                      <a-input
                        v-decorator="[
                            'idCard',
                            {rules: [{ required: true, message: '请输入持卡人证件号码' },{
                               validator: validateIdentityNo2
                             }],validateTrigger: 'blur'}
                          ]"
                        placeholder="请输入持卡人证件号码"
                      />
                    </a-form-item>
                  </div>
                </a-tab-pane>
              </a-tabs>

              <a-form-item v-bind="formItemLayout" label="开户行名称">
                <div>
                  <a-select
                    showSearch
                    :notFoundContent="null"
                    :defaultActiveFirstOption="false"
                    :showArrow="false"
                    :filterOption="false"
                    @focus="handleFocus"
                    @blur="handleBlur"
                    @search="bankNameSearch"
                    @change="bankNameChange"
                    class="width-sty"
                    v-decorator="[
                        'bankName',
                        {rules: [{ required: true, message: '请选择开户行名称' }]}
                      ]"
                    placeholder="请输入银行名称进行选择"
                  >
                    <!-- <a-select
                class="width-sty"
                v-decorator="[
                        'bankName',
                        {rules: [{ required: true, message: '请选择开户行名称' }]}
                      ]"
                placeholder="请选择开户行名称"
                    >-->
                    <a-select-option v-for="d in seloptions" :key="d.value">{{d.label}}</a-select-option>
                  </a-select>
                </div>
              </a-form-item>

              <a-form-item v-bind="formItemLayout" label="开户行所在地" required>
                <a-cascader
                  class="w-sty"
                  :options="options3"
                  @blur="addressBlur"
                  @change="addressChange"
                  v-decorator="[
                          'bankaddress',
                          {
                              rules: [{
                              required: true, message: '请选择',
                              }],
                          }
                          ]"
                  placeholder="请选择开户行所在地"
                />
                <!-- v-decorator="['bankaddress ',{rules: [{ required: true, message: '请选择开户行所在地' }]}]" -->
              </a-form-item>

              <a-form-item v-bind="formItemLayout" label="支行名称">
                <div>
                  <a-select
                    showSearch
                    labelInValue
                    optionFilterProp="children"
                    :defaultActiveFirstOption="false"
                    :filterOption="filterOption"
                    style="width:100%;"
                    @change="onChange"
                    v-decorator="[
                        'bankBranchName',
                        {rules: [{ required: true, message: '请输入支行名称' }]}
                      ]"
                    placeholder="请选择支行名称"
                  >
                    <a-select-option v-for="d in bankBranchoptions" :key="d.value">{{d.label}}</a-select-option>
                  </a-select>
                </div>
              </a-form-item>

              <a-form-item v-bind="formItemLayout" label="账号">
                <a-input
                  v-decorator="[
                        'cardNo',
                        {rules: [{ required: true, message: '请输入账号' }]}
                      ]"
                  placeholder="请输入账号"
                />
              </a-form-item>

              <a-form-item v-bind="formItemLayout" label="结算银行账户(账户证明)" v-if="!isPrivate">
                <div class="clearfix" style="display:inline-block;">
                  <a-upload
                    v-decorator="['upload8',{rules: [{ required: true, message: '请上传账户证明!' }]}]"
                    :data="{to}"
                    name="upfile"
                    :headers="henderstoken"
                    action="/file/file/upload"
                    listType="picture-card"
                    :fileList="fileList4"
                    @preview="handlePreview4"
                    @change="handleChange4"
                  >
                    <div v-if="fileList4.length < 1">
                      <a-icon type="plus" />
                      <div class="ant-upload-text">账户证明</div>
                    </div>
                  </a-upload>
                  <a-modal :visible="previewVisible4" :footer="null" @cancel="handleCancel4">
                    <img alt="example" style="width: 100%" :src="previewImage4" />
                  </a-modal>
                  <span class="span-sty">账户证明</span>
                </div>
              </a-form-item>

              <a-form-item v-bind="formItemLayout" v-if="isPrivate" label="结算银行账户">
                <!-- v-show="this.type=='mer'" -->
                <div class="clearfix" style="display:inline-block;">
                  <a-upload
                    v-decorator="['upload6',{rules: [{ required: true, message: '请上传银行卡面!' }]}]"
                    :data="{to}"
                    name="upfile"
                    :headers="henderstoken"
                    action="/file/file/upload"
                    listType="picture-card"
                    :fileList="fileList5"
                    @preview="handlePreview5"
                    @change="handleChange5"
                  >
                    <div v-if="fileList5.length < 1">
                      <a-icon type="plus" />
                      <div class="ant-upload-text">银行卡正面</div>
                    </div>
                  </a-upload>
                  <a-modal :visible="previewVisible5" :footer="null" @cancel="handleCancel5">
                    <img alt="example" style="width: 100%" :src="previewImage5" />
                  </a-modal>
                  <span class="span-sty">银行卡正面</span>
                </div>
                <p
                style="font-size: 12px;line-height: 30px;"
              >为了您的资金安全，请勿上传带有CVV安全码的照片</p>
              </a-form-item>
            </div>
            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">商户资料</a-col>
            </a-row>
            <a-form-item style="margin-bottom: 0;" v-bind="formItemLayout" label="委托入款证明" help>
              <!-- <a-form-item label=""> -->
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload11',{rules: []}]"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList7"
                  :data="{to}"
                  @preview="handlePreview7"
                  @change="handleChange7"
                >
                  <div v-if="fileList7.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">委托入款授权书</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible7" :footer="null" @cancel="handleCancel7">
                  <img alt="example" style="width: 100%" :src="previewImage7" />
                </a-modal>
              </div>
            </a-form-item>
            <a-row style="margin-bottom: 20px;">
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle"></a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:17,offset:1 }">
                <p style="font-size:12px;">
                  企业商户，若结算银行非企业对公账户时；个体工商户，若结算银行非法人银行卡时，需提供
                  <a
                    class="a-sty"
                    style="color:#1478d5;"
                    @click="getFileDownload('entrust_income_auth')"
                  >委托入款授权书</a>
                </p>
              </a-col>
            </a-row>
            <!-- 关系证明 -->
            <a-form-item v-bind="formItemLayout" label="关系证明">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload16']"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList8"
                  @preview="handlePreview8"
                  @change="handleChange8"
                >
                  <div v-if="fileList8.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">亲属关系证明</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible8" :footer="null" @cancel="handleCancel8">
                  <img alt="example" style="width: 100%" :src="previewImage8" />
                </a-modal>
              </div>
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList9"
                  @preview="handlePreview9"
                  @change="handleChange9"
                >
                  <div v-if="fileList9.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">手持身份证合照</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible9" :footer="null" @cancel="handleCancel9">
                  <img alt="example" style="width: 100%" :src="previewImage9" />
                </a-modal>
              </div>
              <p style="font-size: 12px;margin:0;line-height: 30px;">个体工商户，当结算银行账户所属为“非法人”时，需提供以下材料：</p>
              <p style="font-size: 12px;margin:0;line-height: 30px;">1、入账双方亲属关系证明，如户口簿、结婚证照片</p>
              <p style="font-size: 12px;margin:0;line-height: 30px;">2、入账双方手持各自身份证合照</p>
            </a-form-item>

            <!-- 持卡人身份证 -->
            <a-form-item v-bind="formItemLayout" label="持卡人身份证">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload18']"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList10"
                  @preview="handlePreview10"
                  @change="handleChange10"
                >
                  <div v-if="fileList10.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证正面</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible10" :footer="null" @cancel="handleCancel10">
                  <img alt="example" style="width: 100%" :src="previewImage10" />
                </a-modal>
              </div>
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList11"
                  @preview="handlePreview11"
                  @change="handleChange11"
                >
                  <div v-if="fileList11.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证反面</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible11" :footer="null" @cancel="handleCancel11">
                  <img alt="example" style="width: 100%" :src="previewImage11" />
                </a-modal>
              </div>
              <p
                style="font-size: 12px;margin:0;line-height: 30px;"
              >企业、个体工商户，当结算银行账户所属为“非法人”时，需提供持卡人身份证正面和背面照片</p>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="其他材料">
              <div class="clearfix">
                <a-upload
                  v-decorator="['upload12']"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList12"
                  :data="{to}"
                  @preview="handlePreview12"
                  @change="handleChange12"
                >
                  <div v-if="fileList12.length < 3">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">其他材料</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible12" :footer="null" @cancel="handleCancel12">
                  <img alt="example" style="width: 100%" :src="previewImage12" />
                </a-modal>
              </div>
            </a-form-item>
            <div>
            <trans-limit-table :translimitParams="translimitParams" ref="getData"></trans-limit-table>
            </div>
            
            <br><br>
            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">上传申请表</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:17 }">
                <p class="p-sty">
                  对上述任意内容变更，请务必上传《商户信息变更申请表》加盖公章（企业）法定代表人手印（个体工商户）的照片,支持图片格式JPG,PNG,且每个文件大小不超过1M
                  <span
                    style="color:#1890ff;"
                  >
                    <a class="a-sty" @click="getFileDownload('merchant_imformation_modify')">下载模板</a>
                  </span>
                </p>
              </a-col>
            </a-row>

            <a-form-item v-bind="formItemLayout" label="变更申请表">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload4',{rules: [{ required: true, message: '请上传申请表!' }]}]"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileList13"
                  @preview="handlePreview13"
                  @change="handleChange13"
                >
                  <div v-if="fileList13.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">变更申请表</div>
                  </div>
                </a-upload>
                <a-modal :visible="previewVisible13" :footer="null" @cancel="handleCancel3">
                  <img alt="example" style="width: 100%" :src="previewImage13" />
                </a-modal>
              </div>
            </a-form-item>
            <a-row>
              <a-col :sm="{ span:17,offset:7 }">
                <a-button
                  style="width: 6vw;"
                  html-type="submit"
                  type="primary"
                  :loading="successLoading"
                >提交</a-button>
                <a-button style="width: 6vw;margin-left: 1vw;" type="primary" @click="gologin">取消</a-button>
              </a-col>
            </a-row>
            <div style="text-align:center;margin:20px 0;"></div>
          </a-form>
        </div>
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- - -->
        <!-- 小微商户信息内容 -->
        <div v-if="isSmall">
          <a-form @submit="smallHandleSubmit" style="width:80%;margin:0 auto;" :form="smallForm">
            <p style="color:#3a3a3a;">
              <a>我们将在1个工作日内完成审核，审核通过后变更生效。</a>
              <br />
              <span style="color:#a4a4a4">注：以下所有上传资料，格式支持图片格式JPG、PNG，且每个文件大小不超过{{imageSize}}M</span>
            </p>

            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">基本信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">适用于特约商户更名等情况</p>
              </a-col>
            </a-row>
            <a-form-item v-bind="formItemLayout" label="客户简称" help="4-8个字，商户简称需要符合所选商户类别！">
              <a-input maxLength="8"
                v-decorator="[
                      'shortName',
                      {rules: [{ required: true, message: '请输入客户简称' },{
                         
                       }],validateTrigger: 'blur'}
                    ]"
                placeholder="请输入客户简称"
              />
            </a-form-item>

            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">申请人信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">适用于身份证有效期更新，若修改此项，请重新上传申请人身份证</p>
              </a-col>
            </a-row>

            <a-form-item v-bind="formItemLayout" label="姓名">
              <span>{{infoSmall.identityRequest.identityName}}</span>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件类型">
              <div>
                <a-select
                  disabled
                  class="width-sty"
                  v-decorator="[
                      'codetype',
                      {rules: [{ required: true, message: '请选择证件类型' }],initialValue: 'legal'}
                    ]"
                >
                  <a-select-option value="legal">身份证</a-select-option>
                  <a-select-option value="lucy">护照</a-select-option>
                  <a-select-option value="disabled">港澳台通行证</a-select-option>
                  <a-select-option value="Yiminghe">军官证</a-select-option>
                  <a-select-option value="Yiminghe">户口簿</a-select-option>
                </a-select>
              </div>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件号码">
              <span>{{infoSmall.identityRequest.identityNo}}</span>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="证件有效期">
              <a-date-picker
                placeholder="请选择证件有效期"
                @change="dateChangeSmall"
                v-decorator="[
                      'expiryDate',
                      {rules: [{ required: true, message: '请选择证件有效期' }]}
                    ]"
              />
            </a-form-item>
            <!-- 持卡人身份证 -->
            <a-form-item v-bind="formItemLayout" label="申请人身份证">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload1']"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileListSmall1"
                  @preview="handlePreviewSmall1"
                  @change="handleChangeSmall1"
                >
                  <div v-if="fileListSmall1.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证正面</div>
                  </div>
                </a-upload>
                <a-modal
                  :visible="previewVisibleSmall1"
                  :footer="null"
                  @cancel="handleCancelSmall1"
                >
                  <img alt="example" style="width: 100%" :src="previewImageSmall1" />
                </a-modal>
              </div>
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileListSmall2"
                  @preview="handlePreviewSmall2"
                  @change="handleChangeSmall2"
                >
                  <div v-if="fileListSmall2.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">身份证反面</div>
                  </div>
                </a-upload>
                <a-modal
                  :visible="previewVisibleSmall2"
                  :footer="null"
                  @cancel="handleCancelSmall2"
                >
                  <img alt="example" style="width: 100%" :src="previewImageSmall2" />
                </a-modal>
              </div>
            </a-form-item>

            <a-row style="display:flex;align-items: center;">
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">结算账户信息</a-col>
              <a-col :xs="{ span : 24 }" :sm="{ span:12 }">
                <p class="p-sty">若修改此项，请重新上传结算银行账户及手持照片</p>
              </a-col>
            </a-row>

            <a-form-item v-bind="formItemLayout" label="账户名称">
              <span>{{infoSmall.bankCardUpdateRequest.accountName}}</span>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="开户行名称">
              <div>
                <a-select
                  showSearch
                  :notFoundContent="null"
                  :defaultActiveFirstOption="false"
                  :showArrow="false"
                  :filterOption="false"
                  @focus="handleFocus"
                  @blur="handleSmallBlur"
                  @search="bankNameSmallSearch"
                  @change="bankNameSmallChange"
                  class="width-sty"
                  v-decorator="[
                        'bankName',
                        {rules: [{ required: true, message: '请选择开户行名称' }]}
                      ]"
                  placeholder="请输入银行名称进行选择"
                >
                  <a-select-option v-for="d in seloptions" :key="d.value">{{d.label}}</a-select-option>
                </a-select>
              </div>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="开户行所在地" required>
              <a-cascader
                class="w-sty"
                v-decorator="[
                          'bankaddress',
                          {
                              rules: [{
                              required: true, message: '请选择',
                              }],
                          }
                          ]"
                :options="options3"
                @blur="addressSmallBlur"
                @change="addressChange"
                placeholder="请选择开户行所在地"
              />
              <!-- v-decorator="['bankaddress ',{rules: [{ required: true, message: '请选择开户行所在地' }]}]" -->
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="支行名称">
              <div>
                <a-select
                  showSearch
                  :defaultActiveFirstOption="false"
                  @search="handleSearch"
                  labelInValue
                  @change="bankBranchNameChange"
                  optionFilterProp="children"
                  :filterOption="filterOption"
                  style="width:100%;"
                  v-decorator="[
                        'bankBranchName',
                        {rules: [{ required: true, message: '请输入支行名称' }]}
                      ]"
                  placeholder="请选择支行名称"
                >
                  <a-select-option v-for="d in bankBranchoptions" :key="d.value">{{d.label}}</a-select-option>
                </a-select>
              </div>
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="账号">
              <a-input
                @blur="findCardBin"
                v-decorator="[
                        'cardNo',
                        {rules: [{ required: true, message: '请输入账号' }]}
                      ]"
                placeholder="请输入账号"
              />
            </a-form-item>

            <a-form-item v-bind="formItemLayout" label="银行预留手机号">
              <div>
                <a-input
                  name="phone"
                  placeholder="请输入预留银行手机号"
                  v-decorator="[
                          'mobileNo',
                          {
                           rules: [{ required: true, message: '请输入预留银行手机号!' },{validator: validateCode}],validateTrigger: 'blur'
                          }
                          ]"
                />
              </div>
            </a-form-item>
            <!-- 对私账户显示 -->
            <a-form-item v-bind="formItemLayout" label="持卡人身份证号">
              <span>{{infoSmall.identityRequest.identityNo}}</span>
            </a-form-item>

            <!-- 持卡人身份证 -->
            <a-form-item v-bind="formItemLayout" label="结算银行账户">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload3']"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileListSmall3"
                  @preview="handlePreviewSmall3"
                  @change="handleChangeSmall3"
                >
                  <div v-if="fileListSmall3.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">银行卡正面</div>
                  </div>
                </a-upload>
                <a-modal
                  :visible="previewVisibleSmall3"
                  :footer="null"
                  @cancel="handleCancelSmall3"
                >
                  <img alt="example" style="width: 100%" :src="previewImageSmall3" />
                </a-modal>
              </div>
              <p
                style="font-size: 12px;line-height: 30px;"
              >为了您的资金安全，请勿上传带有CVV安全码的照片</p>
            </a-form-item>

            <a-row>
              <a-col :xs="{ span : 24 }" :sm="{ span:6 }" class="formGroupTitle">商户资料</a-col>
            </a-row>

            <a-form-item v-bind="formItemLayout" label="申请人手持身份证和银行卡">
              <div class="clearfix" style="display:inline-block;">
                <a-upload
                  v-decorator="['upload5',{rules: [{ required: true, message: '请上传手持照片!' }]}]"
                  :data="{to}"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileListSmall5"
                  @preview="handlePreviewSmall5"
                  @change="handleChangeSmall5"
                >
                  <div v-if="fileListSmall5.length < 1">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">手持照片</div>
                  </div>
                </a-upload>
                <a-modal
                  :visible="previewVisibleSmall5"
                  :footer="null"
                  @cancel="handleCancelSmall5"
                >
                  <img alt="example" style="width: 100%" :src="previewImageSmall5" />
                </a-modal>
              </div>
            </a-form-item>
            <a-form-item v-bind="formItemLayout" label="其他材料">
              <div class="clearfix">
                <a-upload
                  v-decorator="['uploadOther']"
                  name="upfile"
                  :headers="henderstoken"
                  action="/file/file/upload"
                  listType="picture-card"
                  :fileList="fileListSmall6"
                  :data="{to}"
                  @preview="handlePreviewSmall6"
                  @change="handleChangeSmall6"
                >
                  <div v-if="fileListSmall6.length < 3">
                    <a-icon type="plus" />
                    <div class="ant-upload-text">其他材料</div>
                  </div>
                </a-upload>
                <a-modal
                  :visible="previewVisibleSmall6"
                  :footer="null"
                  @cancel="handleCancelSmall6"
                >
                  <img alt="example" style="width: 100%" :src="previewImageSmall6" />
                </a-modal>
              </div>
            </a-form-item>

            <a-row>
              <a-col :sm="{ span:17,offset:7 }">
                <a-button
                  style="width: 6vw;"
                  html-type="submit"
                  type="primary"
                  :loading="successLoading"
                >提交</a-button>
                <a-button style="width: 6vw;margin-left: 1vw;" type="primary" @click="gologin">取消</a-button>
              </a-col>
            </a-row>
          </a-form>
        </div>
        <!-- 以上小微商户 -->
        <a-modal title="信息变更手机短信验证！" v-model="modalVisible" :footer="null">
          <a-form @submit="orgSubmit" :form="modalForm" style="margin:0 auto;">
            <a-form-item v-bind="formItemLayout1" label="手机号码">
              <span>我们已向手机号{{this.bankCardDTO.mobileNo | phoneFilter }}发送了一条验证码，请查收后填写</span>
            </a-form-item>
            <a-form-item v-bind="formItemLayout1" label="验证码">
              <a-input
                style="width:70%;"
                v-model="query.verCode"
                name="captcha"
                placeholder="请输入验证码"
              />
            </a-form-item>
            <div style="text-align:center;">
              <a-button style="width: 5vw;" htmlType="submit" type="primary">确定</a-button>
            </div>
          </a-form>
        </a-modal>
      </div>
    </div>
  </div>
</template>

<script>
import AForm from "ant-design-vue/es/form/Form";
import ATabs from "ant-design-vue/es/tabs";

import AFormItem from "ant-design-vue/es/form/FormItem";
import AInput from "ant-design-vue/es/input/Input";
import AIcon from "ant-design-vue/es/icon";
import AInputGroup from "ant-design-vue/es/input/Group";
import AButton from "ant-design-vue/es/button/button";
import ACol from "ant-design-vue/es/grid/Col";
import ARow from "ant-design-vue/es/grid/Row";
import ACheckbox from "ant-design-vue/es/checkbox/Checkbox";
import AAlert from "ant-design-vue/es/alert/index";
const ATabPane = ATabs.TabPane;
const DetailListItem = DetailList.Item;

import DetailList from "../../../../components/tool/DetailList";
import TransLimitTable from "../../../common/TransLimitTable";
import pick from "lodash.pick";
import api from "@/common/api";
import { get, post } from "@/common/api";
import moment from "moment";
import { type } from "os";
import { mapState } from "vuex";
const dateFormat = "YYYY-MM-DD";

export default {
  name: "Login",
  components: {
    AAlert,
    ACheckbox,
    ACol,
    ARow,
    AButton,
    AInputGroup,
    AIcon,
    AInput,
    AFormItem,
    ATabPane,
    ATabs,
    AForm,
    DetailListItem,
    DetailList,
    TransLimitTable,
  },
  data() {
    return {
      imageSrc: "",
      btntext: "重要信息变更",
      modalVisible: false,
      visible: false,
      accountInfo: false,
      isSmall: false,
      companyName: "",
      query: {
        verCode: "",
      },
      henderstoken: {
        Authorization: localStorage.getItem("token"),
      },
      to:"",
      spinning: true,
      iconLoading: false,
      successLoading: false,
      customerOrg: {},
      legal: {},
      bank: {},
      type: null,
      isAbled: true,
      isInitStatus: true,
      img: {
        businessimg: null,
        pubaccountimg: null,
        frontcardimg: null,
        reversecardimg: null,
        fronbankcardimg: null,
        reversebancardimg: null,
        video: null,
      },
      information: { legalIdentity: {}, bankCard: {} },
      infoSmall: {
        identityRequest: {
          idNo: "",
          identityName: "",
          identityNo: "",
          expiryDate: "",
          imgHead: "",
          imgEmblem: "",
        },
        bankCardUpdateRequest: {
          accountNo: "",
          mobileNo: "",
          accountName: "",
          bankName: "",
          province: "",
          city: "",
          bankBranchName: "",
          cardNo: "",
          imgCardno: "",
        },
      },
      endOpen: false,
      update: false,
      bankCard: {},
      translimitParams: [],
      identityLegalDTO: {},
      cardHolderIdentityDTO: {
        imgHead: "",
        imgEmblem: "",
      },
      bankCardDTO: {},
      merchant: {},
      form: this.$form.createForm(this),
      smallForm: this.$form.createForm(this),
      modalForm: this.$form.createForm(this),
      error: "",
      loginpwd: "",
      loginpwd2: "",
      login: false,
      isshow: false,
      bankaddress: [],
      startDate: "",
      endDate: "",
      startValue: null,
      endValue: null,
      //   重要信息修改
      isempty: true,
      isenter: true,
      previewImage: "",
      previewImage1: "",
      previewImage3: "",
      previewImage4: "",
      previewImage2: "",
      previewImage5: "",
      previewImage6: "",
      previewImage7: "",
      previewImage8: "",
      previewImage9: "",
      previewImage10: "",
      previewImage11: "",
      previewImage12: "",
      previewImage13: "",
      previewImageSmall1: "",
      previewImageSmall2: "",
      previewImageSmall3: "",
      previewImageSmall4: "",
      previewImageSmall5: "",
      previewImageSmall6: "",
      options: [],
      options3: [],
      seloptions: [],
      previewVisible: false,
      previewVisible1: false,
      previewVisible2: false,
      previewVisible3: false,
      previewVisible4: false,
      previewVisible5: false,
      previewVisible6: false,
      previewVisible7: false,
      previewVisible8: false,
      previewVisible9: false,
      previewVisible10: false,
      previewVisible11: false,
      previewVisible12: false,
      previewVisible13: false,
      previewVisibleSmall1: false,
      previewVisibleSmall2: false,
      previewVisibleSmall3: false,
      previewVisibleSmall4: false,
      previewVisibleSmall5: false,
      previewVisibleSmall6: false,
      fileList: [],
      fileList1: [],
      fileList2: [],
      fileList3: [],
      fileList4: [],
      fileList5: [],
      fileList6: [],
      fileList7: [],
      fileList8: [],
      fileList9: [],
      fileList10: [],
      fileList11: [],
      fileList12: [],
      fileList13: [],
      fileListSmall1: [],
      fileListSmall2: [],
      fileListSmall3: [],
      fileListSmall4: [],
      fileListSmall5: [],
      fileListSmall6: [],
      bankBranchoptions: [],
      login: false,
      oldmerchantName: "",
      idCard: "",
      formItemLayout1: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 4 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 19, offset: 1 },
          md: { span: 15, offset: 1 },
        },
      },
      formItemLayout: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 14, offset: 1 },
          md: { span: 12, offset: 1 },
        },
      },
      tabShow: "1",
      isPrivate: false,
      legalPersonAccount: Boolean,
    };
  },
  watch: {},
  computed: {
    ...mapState({
      imageSize: (state) => state.imageSize,
      videoSize: (state) => state.videoSize,
    }),
  },
  filters: {
    cardNofilter(value) {
      if (value) {
        var reg = /.*(.{4})$/;
        return value.replace(reg, "**** **** **** $1");
      }
    },
    cashfilter(value) {
      return parseFloat(value / 100).toFixed(2);
      // return Number(value).toFixed(2)
    },
    phoneFilter(value) {
      if (value) {
        return value.substring(0, 3) + "****" + value.substring(7, 11);
      }
    },
  },
  created() {
    if (this.$route.params.type == "small") {
      console.log("111111");
      this.isSmall = true;
    } else if (this.$route.params.type == "org") {
      this.isSmall = false;
    }
  },
  mounted() {
    this.companyName = sessionStorage.getItem("companyName");
    this.getareaData();
    this.mainInfoModify();
  },
  activated() {},
  methods: {
    moment,
    init: function () {
      this.$axios
        .get("/agent/merchant/account/information/important/all")
        .then((res) => {
          console.log("重要信息", res);
          console.log("审核状态状态", res.data.data.isInitStatus);
          if (res.data.data.isInitStatus == false) {
            this.isAbled = false;
            this.btntext = "重要信息变更";
          } else {
            this.isAbled = true;
            this.btntext = "当前变更正在审核中";
          }
          //img:{businessimg:null,pubaccountimg:null,frontcardimg:null,reversecardimg:null,fronbankcardimg:null,reversebancardimg:null,video:null},
          if (res.data.code == "OK") {
            this.spinning = false;

            this.merchant = res.data.data.merchantPospDTO; //基本信息
            this.legal = res.data.data.merchantPospDTO.identityLegalDTO; //法定代表人
            this.bank = res.data.data.merchantPospDTO.bankCardDTO; //银行卡账户信息

            // this.type = res.data.customerOrg.customerType;
            // this.customerOrg = res.data.customerOrg;//经营信息
            // this.img.businessimg = res.data.customerOrg.image;//营业执照
            // this.img.frontcardimg = res.data.customerOrg.legalIdentityDTO.imgHead;//身份证正面
            // this.img.reversecardimg = res.data.customerOrg.legalIdentityDTO.imgEmblem;//身份证反面
            // this.img.video = res.data.customerOrg.imageExt2;//视频

            // if (this.type == "org") {
            //   this.img.pubaccountimg = res.data.customerOrg.imageExt1;//对公账户
            // } else if (this.type == "mer") {
            //   this.img.fronbankcardimg = res.data.customerOrg.bankCardDTO.imgCardno;//银行卡正面
            // }
          } else {
            this.$message.warning(res.data.message);
            this.spinning = false;
          }
        });
    },

    mainInfoModify() {
      this.iconLoading = true;
      this.$axios
        .get(
          "/agent/merchant/information/change/important/" +
            this.$route.params.id
        )
        .then((res) => {
          console.log("重要信息变更查询", res);

          if (res.data.code == "OK") {
            this.iconLoading = false;
            if (res.data.data.isInitStatus == false) {
              this.isInitStatus = false;
            } else {
              this.isInitStatus = true;
            }

            this.to = res.data.data.merchantPospDTO.memberNo + "_" + res.data.data.merchantPospDTO.merchantName

            if (this.$route.params.type == "small") {
              this.infoSmall.handCardImg =
                res.data.data.merchantPospDTO.handCardImg;
              this.infoSmall.otherImgs =
                res.data.data.merchantPospDTO.otherImgs;
              this.infoSmall.shortName =
                res.data.data.merchantPospDTO.shortName;

              if (res.data.data.merchantPospDTO.bankCardDTO) {
                this.infoSmall.bankCardUpdateRequest.accountNo =
                  res.data.data.merchantPospDTO.bankCardDTO.accountNo;
                this.infoSmall.bankCardUpdateRequest.mobileNo =
                  res.data.data.merchantPospDTO.bankCardDTO.mobileNo;
                this.infoSmall.bankCardUpdateRequest.accountName =
                  res.data.data.merchantPospDTO.bankCardDTO.accountName;
                this.infoSmall.bankCardUpdateRequest.bankName =
                  res.data.data.merchantPospDTO.bankCardDTO.bankName;
                this.infoSmall.bankCardUpdateRequest.province =
                  res.data.data.merchantPospDTO.bankCardDTO.province;
                this.infoSmall.bankCardUpdateRequest.city =
                  res.data.data.merchantPospDTO.bankCardDTO.city;
                this.infoSmall.bankCardUpdateRequest.bankBranchName =
                  res.data.data.merchantPospDTO.bankCardDTO.bankBranchName;
                this.infoSmall.bankCardUpdateRequest.bankNo =
                  res.data.data.merchantPospDTO.bankCardDTO.bankNo;
                this.infoSmall.bankCardUpdateRequest.cardNo =
                  res.data.data.merchantPospDTO.bankCardDTO.cardNo;

                this.infoSmall.bankCardUpdateRequest.imgCardno =
                  res.data.data.merchantPospDTO.bankCardDTO.imgCardno;
              }
              if (res.data.data.merchantPospDTO.identityDTO) {
                this.infoSmall.identityRequest.idNo =
                  res.data.data.merchantPospDTO.identityDTO.idNo; //基本信息
                this.infoSmall.identityRequest.identityName =
                  res.data.data.merchantPospDTO.identityDTO.identityName; //基本信息
                this.infoSmall.identityRequest.identityNo =
                  res.data.data.merchantPospDTO.identityDTO.identityNo; //基本信息

                this.infoSmall.identityRequest.expiryDate =
                  res.data.data.merchantPospDTO.identityDTO.expiryDate; //基本信息
                this.infoSmall.identityRequest.imgHead =
                  res.data.data.merchantPospDTO.identityDTO.imgHead; //基本信息
                this.infoSmall.identityRequest.imgEmblem =
                  res.data.data.merchantPospDTO.identityDTO.imgEmblem; //基本信息
              }
              this.options3 = [
                {
                  value: this.infoSmall.bankCardUpdateRequest.province,
                  label: this.infoSmall.bankCardUpdateRequest.province,
                  children: [
                    {
                      value: this.infoSmall.bankCardUpdateRequest.city,
                      label: this.infoSmall.bankCardUpdateRequest.city,
                    },
                  ],
                },
              ];
              this.fileListSmall1 = [
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url:
                    "/file/file/download/" +
                    this.infoSmall.identityRequest.imgHead,
                },
              ];
              this.fileListSmall2 = [
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url:
                    "/file/file/download/" +
                    this.infoSmall.identityRequest.imgEmblem,
                },
              ];
              this.fileListSmall3 = [
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url:
                    "/file/file/download/" +
                    this.infoSmall.bankCardUpdateRequest.imgCardno,
                },
              ];
             
              if (this.infoSmall.handCardImg) {
                this.fileListSmall5 = [
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url: "/file/file/download/" + this.infoSmall.handCardImg,
                  },
                ];
              }

              this.fileListSmall6 = [];
              if (this.infoSmall.otherImgs) {
                this.infoSmall.otherImgs.forEach((item) => {
                  let Item = {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url: "/file/file/download/" + item,
                  };
                  this.fileListSmall6.push(Item);
                });
              } else {
                this.infoSmall.otherImgs = [];
              }

              this.$nextTick(() => {
                this.smallForm.setFieldsValue({
                  
                  shortName: this.infoSmall.shortName, //客户简称
                  upload1: this.infoSmall.identityRequest.imgHead,
                  upload3: this.infoSmall.bankCardUpdateRequest.imgCardno,
                  upload5: this.infoSmall.handCardImg,
                  uploadOther: this.infoSmall.otherImgs,
                  expiryDate: moment(this.infoSmall.identityRequest.expiryDate), //有效期

                  accountName: this.infoSmall.bankCardUpdateRequest.accountName, //账户名称
                  bankName: this.infoSmall.bankCardUpdateRequest.bankName, //开户行名称
                  bankaddress: [
                    this.infoSmall.bankCardUpdateRequest.province,
                    this.infoSmall.bankCardUpdateRequest.city,
                  ], //开户行所在地
                  bankBranchName: {
                    value: this.infoSmall.bankCardUpdateRequest.bankNo,
                    label: this.infoSmall.bankCardUpdateRequest.bankBranchName,
                  }, //支行名称
                  cardNo: this.infoSmall.bankCardUpdateRequest.cardNo, //账户
                  mobileNo: this.infoSmall.bankCardUpdateRequest.mobileNo,
                });
                // this.bank.bankName = this.infoSmall.bankCardUpdateRequest.bankName
                this.handleSmallBlur()
                  this.text2 = [
                    this.infoSmall.bankCardUpdateRequest.province,
                    this.infoSmall.bankCardUpdateRequest.city,
                  ]
                  this.addressSmallBlur();
              });
            } else {
              this.information = res.data.data.merchantPospDTO; //基本信息
              this.translimitParams = res.data.data.transLimitDTOList; //限额信息
              this.identityLegalDTO =
                res.data.data.merchantPospDTO.identityLegalDTO; //法定代表人
              this.bankCardDTO = res.data.data.merchantPospDTO.bankCardDTO; //银行卡账户信息

              this.isPrivate = this.bankCardDTO.isPrivate;
              this.oldmerchantName = this.information.merchantName; //客户名称
              this.idCard = this.identityLegalDTO.identityNo
                ? this.identityLegalDTO.identityNo
                : "";
              if (this.information.cardHolderIdentityDTO) {
                this.cardHolderIdentityDTO = this.information.cardHolderIdentityDTO; //持卡人信息
              }
              this.merchantType = this.information.merchantType;

              this.legalPersonAccount = this.information.legalPersonAccount; //账户所属
              this.information.busiProvinceName =
                res.data.data.merchantPospDTO.busiProvinceName; //省
              this.information.busiProvince =
                res.data.data.merchantPospDTO.busiProvince;
              this.information.busiCityName =
                res.data.data.merchantPospDTO.busiCityName; //市
              this.information.busiCity =
                res.data.data.merchantPospDTO.busiCity;
              this.information.busiDistrictName =
                res.data.data.merchantPospDTO.busiDistrictName; //区
              this.information.busiDistrict =
                res.data.data.merchantPospDTO.busiDistrict;
              this.options3 = [
                {
                  value: this.bankCardDTO.province,
                  label: this.bankCardDTO.province,
                  children: [
                    {
                      value: this.bankCardDTO.city,
                      label: this.bankCardDTO.city,
                    },
                  ],
                },
              ];
              console.log("this.options3", this.options3);
              // this.information.memberNo = res.data.customerOrg.memberNo;
              // this.information.orgExpiryDateStart = res.data.customerOrg.orgExpiryDateStart;//开始时间
              // this.information.orgExpiryDateEnd = res.data.customerOrg.orgExpiryDateEnd;//结束时间
              // this.information.image = res.data.customerOrg.image;//营业执照
              // this.information.legalIdentity.expiryDate = res.data.customerOrg.legalIdentityDTO.expiryDate//身份证修改有效日期
              // this.information.legalIdentity.imgHead = res.data.customerOrg.legalIdentityDTO.imgHead;//身份证正面
              // this.information.legalIdentity.imgEmblem = res.data.customerOrg.legalIdentityDTO.imgEmblem;//身份证反面
              // this.information.legalIdentity.idNo = res.data.customerOrg.legalIdentityDTO.idNo;
              // this.information.imageExt2 = res.data.customerOrg.imageExt2;//法人代表视频
              // this.information.bankCard.accountNo = res.data.customerOrg.bankCardDTO.accountNo;//账户号
              // this.information.bankCard.accountName = res.data.customerOrg.bankCardDTO.accountName;//账户名称
              // this.information.bankCard.bankNo = res.data.customerOrg.bankCardDTO.bankNo;//支行号

              this.fileList = [
                //营业执照
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url: "/file/file/download/" + this.information.image,
                },
              ];
              this.fileList2 = [
                //身份证正
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url: "/file/file/download/" + this.identityLegalDTO.imgHead,
                },
              ];
              this.fileList3 = [
                //身份证反
                {
                  uid: Math.random(10000),
                  name: "xxx.png",
                  status: "done",
                  url: "/file/file/download/" + this.identityLegalDTO.imgEmblem,
                },
              ];
              if (this.information.publicAccount) {
                this.fileList4 = [
                  //对公账户
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url:
                      "/file/file/download/" + this.information.publicAccount,
                  },
                ];
              }
              if (this.bankCardDTO.imgCardno) {
                this.fileList5 = [
                  //银行卡正
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url: "/file/file/download/" + this.bankCardDTO.imgCardno,
                  },
                ];
              }
              

              if (this.information.entrustRecharImg) {
                this.fileList7 = [
                  //授权委托书
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url:
                      "/file/file/download/" +
                      this.information.entrustRecharImg,
                  },
                ];
              }
              if (this.information.kinshipCertificateImg) {
                this.fileList8 = [
                  //亲属关系证明
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url:
                      "/file/file/download/" +
                      this.information.kinshipCertificateImg,
                  },
                ];
              }
              if (this.information.handCardImg) {
                this.fileList9 = [
                  //亲属关系证明
                  {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url: "/file/file/download/" + this.information.handCardImg,
                  },
                ];
              }
              if (this.cardHolderIdentityDTO) {
                if (this.cardHolderIdentityDTO.imgHead) {
                  this.fileList10 = [
                    //持卡人身份证正
                    {
                      uid: Math.random(10000),
                      name: "xxx.png",
                      status: "done",
                      url:
                        "/file/file/download/" +
                        this.cardHolderIdentityDTO.imgHead,
                    },
                  ];
                }
                if (this.cardHolderIdentityDTO.imgEmblem) {
                  this.fileList11 = [
                    //持卡人身份证反
                    {
                      uid: Math.random(10000),
                      name: "xxx.png",
                      status: "done",
                      url:
                        "/file/file/download/" +
                        this.cardHolderIdentityDTO.imgEmblem,
                    },
                  ];
                }
              }
              this.fileList12 = [];
              if (this.information.otherImgs) {
                this.information.otherImgs.forEach((item) => {
                  let Item = {
                    uid: Math.random(10000),
                    name: "xxx.png",
                    status: "done",
                    url: "/file/file/download/" + item,
                  };
                  this.fileList12.push(Item);
                });
              } else {
                this.information.otherImgs = [];
              }

              this.$nextTick(() => {
                this.form.setFieldsValue({
                  //{}} -{{customerOrg.}} -{{customerOrg.}
                  upload: this.information.image, //营业执照
                  // upload6: this.bankCardDTO.imgCardno,//银行正
                  // upload8: this.information.publicAccount,//账户证明

                  merchantName: this.information.merchantName, //客户名称
                  shortName: this.information.shortName, //客户简称
                  // orgRegisterNo: this.information.orgRegisterNo,//社会统一信用代码
                  orgRegisterPrincipal: this.information.orgRegisterPrincipal, //注册资本
                  startDate: moment(this.information.orgExpiryDateStart), //营业起始时间
                  endDate: moment(this.information.orgExpiryDateEnd), //营业结束时间
                  // mainBusiness: this.information.mainBusiness,//主营经营范围
                  dobusAddress: [
                    this.information.busiProvince,
                    this.information.busiCity,
                    this.information.busiDistrict,
                  ], //营业执照地址
                  busiAddress: this.information.busiAddress, //详细地址

                  identityName: this.identityLegalDTO.identityName, //法定代表人姓名
                  identityNo: this.identityLegalDTO.identityNo, //身份证
                  expiryDate: moment(this.identityLegalDTO.expiryDate), //有效期
                  upload5: this.identityLegalDTO.imgHead, //身份证正

                  // accountName: this.bankCardDTO.accountName,//账户名称
                  // bankName: this.bankCardDTO.bankName,//开户行名称
                  // bankaddress: [this.bankCardDTO.province, this.bankCardDTO.city],//开户行所在地
                  // bankBranchName: { value: this.bankCardDTO.bankNo, label: this.bankCardDTO.bankBranchName },//支行名称
                  // cardNo: this.bankCardDTO.cardNo,//账户
                  // isPrivate: "" + this.bankCardDTO.isPrivate,//账户类型
                });
                  
              });
            }
          } else {
            this.$message.warning(res.message);
            this.iconLoading = false;
          }
        });

      // this.handleBlur();
    },
    handleSubmit(e) {
      e.preventDefault();

      if (this.isInitStatus == true) {
        this.$message.error("您还有待审核的变更！");
        return false;
      }
      if (this.bankCardDTO.isPrivate == false) {
        if (
          this.fileList.length == 0 ||
          this.fileList2.length == 0 ||
          this.fileList3.length == 0 ||
          this.fileList4.length == 0 ||
          this.fileList3.length == 0
        ) {
          this.$message.error("请将信息填写完善后在提交");
          this.successLoading = false;
          return false;
        }
      } else {
        if (
          this.fileList.length == 0 ||
          this.fileList2.length == 0 ||
          this.fileList3.length == 0 ||
          this.fileList5.length == 0 ||
          this.fileList3.length == 0
        ) {
          this.$message.error("请将信息填写完善后在提交");
          this.successLoading = false;
          return false;
        }
      }
      let newmerchantName = this.form.getFieldValue("merchantName");
      if (this.oldmerchantName != newmerchantName) {
        if (this.fileList12.length == 0) {
          this.$message.error("请上传其他材料");
          this.successLoading = false;
          return false;
        }
      }

      //企业，“对私”时  个体工商户，“非法人”时
      if (
        (this.isPrivate && this.merchantType == "org") ||
        (this.merchantType == "mer" && !this.legalPersonAccount)
      ) {
        if (this.fileList7.length == 0) {
          this.$message.warning("请上传委托入款证明！");
          return false;
        }
      }
      //个体工商户 非法人
      if (this.merchantType == "mer" && !this.legalPersonAccount) {
        if (this.fileList8.length == 0 || this.fileList9.length == 0) {
          this.$message.warning("请上传关系证明图片！");
          return false;
        }
      }
      //企业，为“对私”，为“非法人”时   个体工商户，为“非法人”时
      if (
        (this.merchantType == "org" &&
          this.isPrivate &&
          !this.legalPersonAccount) ||
        (this.merchantType == "mer" && !this.legalPersonAccount)
      ) {
        if (this.fileList10.length == 0 || this.fileList11.length == 0) {
          this.$message.warning("请上传持卡人身份证图片！");
          return false;
        }
      }
      this.$refs.getData.getTranslimitlist()

      let translimitParams = JSON.stringify(this.$refs.getData.translimitlist); 

      this.form.validateFields((err, values) => {
        if (!err) {
          // if (values.upload12) {
          //   this.information.otherImgs = [];
          //   values.upload12.fileList.forEach((item) => {
          //     this.information.otherImgs.push(item.response.data);
          //   });
          // }
          //处理其他图片
          this.information.otherImgs = [];
          if (values.upload12) {
            let otherImgList = values.upload12.fileList || values.upload12;
            console.log("otherImgList", otherImgList);
            otherImgList.forEach((item) => {
              if (item.response) {
                this.information.otherImgs.push(
                  item.response.data
                );
              } else if (item.url) {
                let list = item.url.split("/");
                console.log(list, list[list.length - 1]);
                this.information.otherImgs.push(
                  list[list.length - 1]
                );
              } else {
                this.information.otherImgs.push(
                  item
                );
              }
            });
          }


          if (values.bankaddress) {
            this.bankCardDTO.province = values.bankaddress[0];
            this.bankCardDTO.city = values.bankaddress[1];
          }
          if (values.bankBranchName) {
            this.bankCardDTO.bankBranchName = values.bankBranchName.label;
          }
          this.bankCardDTO.isPrivate = this.isPrivate;
          console.log(this.information.otherImgs);
          let bankCardUpdateRequest = {
            isPrivate: this.bankCardDTO.isPrivate,
            accountNo: this.bankCardDTO.accountNo,
            accountName: this.tabShow=='2'?this.bankCard.accountName:values.accountName || this.bankCardDTO.accountName,
            bankName: values.bankName || this.bankCardDTO.bankName,
            bankNo: this.bankCardDTO.bankNo,
            province: this.bankCardDTO.province,
            city: this.bankCardDTO.city,
            bankBranchName: this.bankCardDTO.bankBranchName,
            cardNo: values.cardNo || this.bankCardDTO.cardNo,
            imgCardno: this.bankCardDTO.imgCardno,
            mobileNo: values.mobileNo || values.contactBusMobile || values.PrimobileNo || this.bankCardDTO.mobileNo,
          };
          // console.log("bankCardUpdateRequest: ", bankCardUpdateRequest);

          let changeIdentityRequest = {
            idNo: this.identityLegalDTO.idNo,
            identityName: values.identityName,
            identityNo: values.identityNo,
            expiryDate: this.identityLegalDTO.expiryDate,
            imgHead: this.identityLegalDTO.imgHead,
            imgEmblem: this.identityLegalDTO.imgEmblem,
          };

          let cardHolderIdentity =
            this.isPrivate && !this.legalPersonAccount
              ? {
                  idNo: this.cardHolderIdentityDTO.idNo || null,
                  identityNo: values.idCard || this.cardHolderIdentityDTO.identityNo || this.idCard,
                  imgEmblem: this.cardHolderIdentityDTO.imgEmblem,
                  imgHead: this.cardHolderIdentityDTO.imgHead,
                }
              : null;

          // console.log("changeIdentityRequest: ", changeIdentityRequest);

          let upvalues = {
            legalPersonAccount: this.legalPersonAccount,
            otherImgs: this.information.otherImgs,
            entrustRecharImg: this.information.entrustRecharImg,
            memberNo: this.$route.params.id,
            merchantName: values.merchantName,
            shortName: values.shortName,
            // orgRegisterNo: values.orgRegisterNo,
            orgRegisterPrincipal: values.orgRegisterPrincipal,
            orgExpiryDateStart: this.information.orgExpiryDateStart,
            orgExpiryDateEnd: this.information.orgExpiryDateEnd,
            publicAccount: this.information.publicAccount,
            // mainBusiness: values.mainBusiness,
            busiProvince: this.information.busiProvince,
            busiCity: this.information.busiCity,
            busiDistrict: this.information.busiDistrict,
            busiProvinceName: this.information.busiProvinceName,
            busiCityName: this.information.busiCityName,
            busiDistrictName: this.information.busiDistrictName,
            busiAddress: values.busiAddress,
            image: this.information.image,
            modifyImg: this.information.applyModifyPic,
            cardHolderIdentity: cardHolderIdentity,
            legalIdentityRequest: changeIdentityRequest,
            bankCardUpdateRequest: bankCardUpdateRequest,
            translimitParams: translimitParams,
            merchantType: this.merchantType,
            kinshipCertificateImg: this.information.kinshipCertificateImg,
            handCardImg: this.information.handCardImg,
          };
          this.successLoading = true;
          console.log("upvalues: ", upvalues);
          this.$axios
            .post("/agent/merchant/information/important/update", upvalues)
            .then(
              (res) => {
                this.successLoading = false;
                console.log("提交更改", res);
                if (res.data.code == "OK") {
                  this.$message.success("变更成功！");
                  // this.mainInfoModify();
                  this.$router.replace({ path: "/OrgRegister/orgInfoQuery" });
                } else {
                  this.$message.warning(res.data.message);
                }
              },
              (err) => {
                this.successLoading = false;
              }
            );
        }
      });
    },
    smallHandleSubmit(e) {
      e.preventDefault();

      if (this.isInitStatus == true) {
        this.$message.error("您还有待审核的变更！");
        return false;
      }
      this.smallForm.validateFields((err, values) => {
        if (!err) {
          this.infoSmall.otherImgs = [];
          if (values.uploadOther) {
            let otherImgList = values.uploadOther.fileList || values.uploadOther;
            otherImgList.forEach((item) => {
              if (item.response) {
                this.infoSmall.otherImgs.push(
                  item.response.data
                );
              } else if (item.url) {
                let list = item.url.split("/");
                console.log(list, list[list.length - 1]);
                this.infoSmall.otherImgs.push(
                  list[list.length - 1]
                );
              } else {
                this.infoSmall.otherImgs.push(
                  item
                );
              }
            });
          }
          if(values.shortName.length < 4 || values.shortName.length > 8){
            this.$message.error("客户简称必须4-8个字！");
            return false;
          }

          // console.log("values", values);
          this.infoSmall.bankCardUpdateRequest.province = values.bankaddress[0];
          this.infoSmall.bankCardUpdateRequest.city = values.bankaddress[1];
          this.infoSmall.bankCardUpdateRequest.bankName = values.bankName;
          this.infoSmall.bankCardUpdateRequest.bankBranchName = values.bankBranchName.label;
          this.infoSmall.bankCardUpdateRequest.bankNo = values.bankBranchName.value;
          this.infoSmall.bankCardUpdateRequest.cardNo = values.cardNo;
          this.infoSmall.bankCardUpdateRequest.mobileNo = values.mobileNo;

          let data = {
            shortName:values.shortName,
            handCardImg: this.infoSmall.handCardImg,
            otherImgs: this.infoSmall.otherImgs,
            memberNo: this.$route.params.id,
            identityRequest: this.infoSmall.identityRequest,
            bankCardUpdateRequest: this.infoSmall.bankCardUpdateRequest,
          };
          this.successLoading = true;
          // console.log("data", data);
          this.$axios
            .post("/agent/merchant/information/small/important/update", data)
            .then(
              (res) => {
                this.successLoading = false;
                console.log("res", res);
                if (res.data.code == "OK") {
                  this.$message.success(res.data.message);
                  this.$router.replace({ path: "/OrgRegister/orgInfoQuery" });
                } else {
                  this.$message.error(res.data.message);
                }
              },
              (err) => {
                this.successLoading = false;
              }
            );
        }
      });
    },
    onChange(value) {
      // this.information.bankCard.bankBranchName = value.name;
      // this.information.bankCard.bankNo = value.key;
      this.form.setFieldsValue({
        bankBranchName: { value: value.key, label: value.name }, //支行名称
      });
    },
    bankBranchNameChange(value) {
      console.log("value", value);
      this.bankCard.bankNo = value.key;
      this.bankCard.bankBranchName = value.label;
    },
    reset() {},
    conexport() {},
    getareaData() {
      this.$axios.get("/agent/division/all").then((res) => {
        console.log("营业执照地址res", res);
        const result = res.data;
        if (res.data.list) {
          let list = result.list;
          let arr = [];
          let newArr = list.map((item, index, list) => {
            let test = {
              label: item.label,
              value: item.value,
              children: [],
            };
            arr.push(test);
            if (item.children) {
              let children = [];
              for (let i = 0; i < item.children.length; i++) {
                let test2 = {
                  label: item.children[i].label,
                  value: item.children[i].value,
                  children: [],
                };
                children.push(test2);

                if (item.children[i].children) {
                  let child2 = [];
                  for (let a = 0; a < item.children[i].children.length; a++) {
                    let test3 = {
                      label: item.children[i].children[a].label,
                      value: item.children[i].children[a].value,
                    };
                    child2.push(test3);
                  }
                  children[i].children = child2;
                }
              }
              arr[index]["children"] = children;
            }
            return arr;
          });
          // console.log("newArr", newArr);
          this.options = newArr[0];
        } else {
          console.log("res", res);
        }
      });
    },
    handleSearch() {},
    handleOk() {
      this.$router.push("/home");
    },
    beforeUpload(file) {},
    beforeUpload1(file) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".mp4", ".avi", ".3gp", ".mov", ".flv", ".rmvb"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error(
          "上传视频仅支持AVI、MOV、RMVB、FLV、MP4、3GP 6种格式！"
        );
        return false;
      }

      const isLt2M = file.size / 1024 / 1024 < this.videoSize;
      if (!isLt2M) {
        this.$message.error(`视频大小必须小于${this.videoSize}MB!`);
      }
      console.log(file);
      return isLt2M;
    },
    dateChange(date, dateString) {
      console.log("dateString", dateString);
      this.identityLegalDTO.expiryDate = dateString;
    },
    dateChangeSmall(date, dateString) {
      console.log("dateString", dateString);
      this.infoSmall.identityRequest.expiryDate = dateString;
    },
    gologin() {
      this.$router.push(
        "/OrgRegister/orgInfoQueryDetail/" + this.$route.params.id
      );
    },

    // 开始时间
    startChange(date, dateString) {
      console.log("startDate", dateString);
      this.information.orgExpiryDateStart = dateString;
    },
    //结束时间
    endChange(date, dateString) {
      console.log("endDate", dateString);
      this.information.orgExpiryDateEnd = dateString;
    },
    disabledStartDate(startValue) {
      const endValue = this.endValue;
      if (!startValue || !endValue) {
        return false;
      }
      return startValue.valueOf() > endValue.valueOf();
    },
    disabledEndDate(endValue) {
      const startValue = this.startValue;
      if (!endValue || !startValue) {
        return false;
      }
      return startValue.valueOf() >= endValue.valueOf();
    },
    handleStartOpenChange(open) {
      if (!open) {
        this.endOpen = true;
      }
      console.log(open);
    },
    handleEndOpenChange(open) {
      this.endOpen = open;
    },
    tolong() {
      this.$nextTick(() => {
        this.form.setFieldsValue({
          endDate: moment("9999-01-01"),
        });
      });
      this.information.orgExpiryDateEnd = "9999-01-01";
    },
    handleEndOpenChange(open) {
      this.endOpen = open;
    },
    handleChange({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);

        return;
      }
      this.fileList = fileList;
      this.form.setFieldsValue({
        upload: this.img.businessimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.information.image = obj.response.data; //保存营业执照
        let data = {
          imgCardno: obj.response.data,
        };
      }
    },
    handleChange2({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList2 = fileList;
      let obj = fileList[0];
      this.form.setFieldsValue({
        upload5: this.img.frontcardimg,
      });
      if (obj.response) {
        console.log(obj.response.data);
        this.identityLegalDTO.imgHead = obj.response.data; //身份证正面
        let data = {
          imgCardno: obj.response.data,
        };
      }
    },
    handleChange3({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList3 = fileList;

      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.identityLegalDTO.imgEmblem = obj.response.data; //身份证反面
        let data = {
          imgTrack: obj.response.data,
        };
      }
    },
    handleChange4({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList4 = fileList;
      this.form.setFieldsValue({
        upload8: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.information.publicAccount = obj.response.data; //对公账户
        let data = {
          accountPermitImg: obj.response.data,
        };
      }
    },
    handleChange5({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList5 = fileList;
      this.form.setFieldsValue({
        upload6: this.img.fronbankcardimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.bankCardDTO.imgCardno = obj.response.data; //银行卡正面
        let data = {
          imgCardno: obj.response.data,
        };
      }
    },
    handleChange6({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList6 = fileList;
      let obj = fileList[0];
      if (obj.response) {
        this.bankCardDTO.imgTrack = obj.response.data; //银行卡反面
        console.log(obj.response.data);
        let data = {
          imgCardno: obj.response.data,
        };
      }
    },
    handleChange7({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb`);
        return;
      }
      this.fileList7 = fileList;
      let obj =
        fileList.length > 0
          ? fileList[0]
          : { response: { data: null, code: null } };
      if (obj) {
        if (obj.response) {
          if (obj.response.code == "OK") {
            console.log(obj.response.data);
            this.information.entrustRecharImg = obj.response.data;
          } else {
            this.information.entrustRecharImg = "";
          }
        }
      }
    },
    handleChange8({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb`);
        return;
      }
      this.fileList8 = fileList;
      let obj =
        fileList.length > 0
          ? fileList[0]
          : { response: { data: null, code: null } };
      if (obj) {
        if (obj.response) {
          if (obj.response.code == "OK") {
            console.log(obj.response.data);
            this.information.kinshipCertificateImg = obj.response.data;
          } else {
            this.information.kinshipCertificateImg = "";
          }
        }
      }
    },
    handleChange9({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb`);
        return;
      }
      this.fileList9 = fileList;
      let obj =
        fileList.length > 0
          ? fileList[0]
          : { response: { data: null, code: null } };
      if (obj) {
        if (obj.response) {
          if (obj.response.code == "OK") {
            console.log(obj.response.data);
            this.information.handCardImg = obj.response.data;
          } else {
            this.information.handCardImg = "";
          }
        }
      }
    },
    handleChange10({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb`);
        return;
      }
      this.fileList10 = fileList;
      let obj =
        fileList.length > 0
          ? fileList[0]
          : { response: { data: null, code: null } };
      if (obj) {
        if (obj.response) {
          if (obj.response.code == "OK") {
            console.log(obj.response.data);
            this.cardHolderIdentityDTO.imgHead = obj.response.data;
          } else {
            this.cardHolderIdentityDTO.imgHead = "";
          }
        }
      }
    },
    handleChange11({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb`);
        return;
      }
      this.fileList11 = fileList;
      let obj =
        fileList.length > 0
          ? fileList[0]
          : { response: { data: null, code: null } };
      if (obj) {
        if (obj.response) {
          if (obj.response.code == "OK") {
            console.log(obj.response.data);
            this.cardHolderIdentityDTO.imgEmblem = obj.response.data;
          } else {
            this.cardHolderIdentityDTO.imgEmblem = "";
          }
        }
      }
    },
    handleChange12({ file, fileList }) {
      // let pos = file.name.lastIndexOf(".");
      // let lastName = file.name.substring(pos, file.name.length);
      // let supportTypes = [".jpeg", ".png", ".jpg", ".pdf"]; // jpeg、 png
      // if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
      //   this.$message.error("上传图片仅支持 jpeg、 png、pdf 3种格式！");
      //   return;
      // }
      if (file.size / (1024 * 1024) > 50) {
        this.$message.error(`上传图片大小应小于50Mb！`);
        return;
      }
      this.fileList12 = fileList;
      // let obj =
      //   fileList.length > 0
      //     ? fileList[0]
      //     : { response: { data: null, code: null } };
      // if (obj) {
      //   if (obj.response) {
      //     if (obj.response.code == "OK") {
      //       this.information.otherImgs = [];
      //       this.information.otherImgs.push(obj.response.data);
      //     }
      //   }
      // }
    },
    handleChange13({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileList13 = fileList;
      this.form.setFieldsValue({
        upload4: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.information.applyModifyPic = obj.response.data; //变更申请表
      }
    },
    handleChangeSmall1({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileListSmall1 = fileList;
      this.smallForm.setFieldsValue({
        upload1: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.infoSmall.identityRequest.imgHead = obj.response.data; // 小微申请人 身份证正面
      }
    },
    handleChangeSmall2({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileListSmall2 = fileList;
      this.smallForm.setFieldsValue({
        upload2: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.infoSmall.identityRequest.imgEmblem = obj.response.data; // 小微申请人 身份证反面
      }
    },
    handleChangeSmall3({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileListSmall3 = fileList;
      this.smallForm.setFieldsValue({
        upload3: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.infoSmall.bankCardUpdateRequest.imgCardno = obj.response.data; //小微 银行卡正面
      }
    },
    handleChangeSmall4({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileListSmall4 = fileList;
      this.smallForm.setFieldsValue({
        upload4: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.infoSmall.bankCardUpdateRequest.imgTrack = obj.response.data; //银行卡反面
      }
    },
    handleChangeSmall5({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png 2种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > this.imageSize) {
        this.$message.error(`上传图片大小应小于${this.imageSize}Mb！`);
        return;
      }
      this.fileListSmall5 = fileList;
      this.smallForm.setFieldsValue({
        upload5: this.img.pubaccountimg,
      });
      let obj = fileList[0];
      if (obj.response) {
        console.log(obj.response.data);
        this.infoSmall.handCardImg = obj.response.data; //银行卡反面
      }
    },
    handleChangeSmall6({ file, fileList }) {
      let pos = file.name.lastIndexOf(".");
      let lastName = file.name.substring(pos, file.name.length);
      let supportTypes = [".jpeg", ".png", ".jpg", ".pdf"]; // jpeg、 png
      if (supportTypes.indexOf(lastName.toLowerCase()) <= -1) {
        this.$message.error("上传图片仅支持 jpeg、 png、pdf 3种格式！");
        return;
      }
      if (file.size / (1024 * 1024) > 50) {
        this.$message.error(`上传图片大小应小于50Mb！`);
        return;
      }
      this.fileListSmall6 = fileList;
      // this.smallForm.setFieldsValue({
      //   uploadOther: this.img.pubaccountimg,
      // });
      // let obj = fileList[0];
      // if (obj.response) {
      //   console.log(obj.response.data);
      //   if (obj.response.code == "OK") {
      //     // this.infoSmall.otherImgs = [];
      //     this.infoSmall.otherImgs.push(obj.response.data); //其他资料
      //   }
      // }
    },

    filterOption(input, option) {
      return (
        option.componentOptions.children[0].text
          .toLowerCase()
          .indexOf(input.toLowerCase()) >= 0
      );
    },

    addressChange(value, selectedOptions) {
      console.log("addressChange", value);
      this.text2 = value;
      this.bankaddress = value;
      // this.text2 = selectedOptions.map(o => o.label);
      console.log("this.text2", this.text2);
      // if (selectedOptions.length == 1) {
      //   this.bankCard.province = {
      //     label: selectedOptions[0].label,
      //     value: selectedOptions[0].value
      //   };
      // } else if (selectedOptions.length == 2) {
      //   this.bankCard.city = {
      //     label: selectedOptions[1].label,
      //     value: selectedOptions[1].value
      //   };
      // } else if (selectedOptions.length == 3) {
      //   this.bankCard.district = {
      //     label: selectedOptions[2].label,
      //     value: selectedOptions[2].value
      //   };
      // }else {
      //   console.log(selectedOptions);
      // }

      this.bankCard.province = this.text2[0];
      this.bankCard.city = this.text2[1];
      // this.bankCard.district = this.text2[2];
    },
    onbusiChange(value, selectedOptions) {
      console.log("changevalue", typeof value, value);
      this.busitext = value;
      // this.busitext = selectedOptions.map(o => o.label);
      console.log("selectedOptions", selectedOptions);
      if (selectedOptions.length == 1) {
      } else if (selectedOptions.length == 2) {
      } else if (selectedOptions.length == 3) {
        (this.information.busiCityName = selectedOptions[1].label),
          (this.information.busiCity = selectedOptions[1].value);
        (this.information.busiProvinceName = selectedOptions[0].label),
          (this.information.busiProvince = selectedOptions[0].value);
        (this.information.busiDistrictName = selectedOptions[2].label),
          (this.information.busiDistrict = selectedOptions[2].value);
      } else {
        console.log(selectedOptions);
      }
      console.log("this.busitext", this.busitext);
      // this.busiProvince = this.busitext[0];
      // this.busiCityItem = this.busitext[1];
      // this.busiDistrictItem = this.busitext[2];
    },

    handlePreview(file) {
      console.log("file", file);
      this.previewImage = file.url || file.thumbUrl;
      this.previewVisible = true;
    },
    handlePreview1(file) {
      console.log("file", file);
      this.previewImage1 = file.url || file.thumbUrl;
      this.previewVisible1 = true;
    },
    handlePreview2(file) {
      this.previewImage2 = file.url || file.thumbUrl;
      this.previewVisible2 = true;
    },
    handlePreview3(file) {
      this.previewImage3 = file.url || file.thumbUrl;
      this.previewVisible3 = true;
    },
    handlePreview4(file) {
      this.previewImage4 = file.url || file.thumbUrl;
      this.previewVisible4 = true;
    },
    handlePreview5(file) {
      this.previewImage5 = file.url || file.thumbUrl;
      this.previewVisible5 = true;
    },
    handlePreview6(file) {
      this.previewImage6 = file.url || file.thumbUrl;
      this.previewVisible6 = true;
    },
    handlePreview7(file) {
      this.previewImage7 = file.url || file.thumbUrl;
      this.previewVisible7 = true;
    },
    handlePreview8(file) {
      this.previewImage8 = file.url || file.thumbUrl;
      this.previewVisible8 = true;
    },
    handlePreview9(file) {
      this.previewImage9 = file.url || file.thumbUrl;
      this.previewVisible9 = true;
    },
    handlePreview10(file) {
      this.previewImage10 = file.url || file.thumbUrl;
      this.previewVisible10 = true;
    },
    handlePreview11(file) {
      this.previewImage11 = file.url || file.thumbUrl;
      this.previewVisible11 = true;
    },
    handlePreview12(file) {
      this.previewImage12 = file.url || file.thumbUrl;
      this.previewVisible12 = true;
    },
    handlePreview13(file) {
      this.previewImage13 = file.url || file.thumbUrl;
      this.previewVisible13 = true;
    },
    handlePreviewSmall1(file) {
      this.previewImageSmall1 = file.url || file.thumbUrl;
      this.previewVisibleSmall1 = true;
    },
    handlePreviewSmall2(file) {
      this.previewImageSmall2 = file.url || file.thumbUrl;
      this.previewVisibleSmall2 = true;
    },
    handlePreviewSmall3(file) {
      this.previewImageSmall3 = file.url || file.thumbUrl;
      this.previewVisibleSmall3 = true;
    },
    handlePreviewSmall4(file) {
      this.previewImageSmall4 = file.url || file.thumbUrl;
      this.previewVisibleSmall4 = true;
    },
    handlePreviewSmall5(file) {
      this.previewImageSmall5 = file.url || file.thumbUrl;
      this.previewVisibleSmall5 = true;
    },
    handlePreviewSmall6(file) {
      this.previewImageSmall6 = file.url || file.thumbUrl;
      this.previewVisibleSmall6 = true;
    },
    modalHandleCancel(e) {
      this.visible = false;
    },
    handleCancel() {
      this.previewVisible = false;
    },
    handleCancel2() {
      this.previewVisible2 = false;
    },
    handleCancel3() {
      this.previewVisible3 = false;
    },
    handleCancel4() {
      this.previewVisible4 = false;
    },
    handleCancel5() {
      this.previewVisible5 = false;
    },
    handleCancel6() {
      this.previewVisible6 = false;
    },
    handleCancel7() {
      this.previewVisible7 = false;
    },
    handleCancel8() {
      this.previewVisible8 = false;
    },
    handleCancel9() {
      this.previewVisible9 = false;
    },
    handleCancel10() {
      this.previewVisible10 = false;
    },
    handleCancel11() {
      this.previewVisible11 = false;
    },
    handleCancel12() {
      this.previewVisible11 = false;
    },
    handleCancel13() {
      this.previewVisible11 = false;
    },
    handleCancelSmall1() {
      this.previewVisibleSmall1 = false;
    },
    handleCancelSmall2() {
      this.previewVisibleSmall2 = false;
    },
    handleCancelSmall3() {
      this.previewVisibleSmall3 = false;
    },
    handleCancelSmall4() {
      this.previewVisibleSmall4 = false;
    },
    handleCancelSmall5() {
      this.previewVisibleSmall5 = false;
    },
    handleCancelSmall6() {
      this.previewVisibleSmall6 = false;
    },
    identityNameChange(e) {
      let customerType = this.form.getFieldValue("customerType");
      console.log(customerType)
        this.bankCard.accountName=e.target.value,
        this.isempty = false;
    },

    // 开户地址失去焦点
    addressBlur() {
      let selvalue = this.form.getFieldValue("bankName");
      // console.log("开户行地址：", this.text2);
      if (this.text2) {
        let data = {
          bankCode: selvalue,
          province: this.text2[0],
          city: this.text2[1],
          bankName: "",
        };
        api.getBankBranch(
          data,
          (res) => {
            // console.log("res", res);
            if (res.code == "OK") {
              this.bankBranchoptions = res.list;
            } else {
              // console.log(res);
            }
          },
          (err) => {
            console.log(err);
          }
        );
      } else {
        console.log("开户行地址为空");
      }
    },
    // 开户地址失去焦点
    addressSmallBlur() {
      let selvalue = this.smallForm.getFieldValue("bankName");
      // console.log("开户行地址：", this.text2);
      if (this.text2) {
        let data = {
          bankCode: selvalue,
          province: this.text2[0],
          city: this.text2[1],
          bankName: "",
        };
        api.getBankBranch(
          data,
          (res) => {
            // console.log("res", res);
            if (res.code == "OK") {
              this.bankBranchoptions = res.list;
            } else {
              // console.log(res);
            }
          },
          (err) => {
            console.log(err);
          }
        );
      } else {
        console.log("开户行地址为空");
      }
    },
    // 开户名称搜索
    bankNameSmallSearch(value) {
      console.log(value);
      let data = {
        bankSuper: value,
      };
      api.getBankName(data, (res) => {
        console.log("res", res);
        if (res.code == "OK") {
          this.seloptions = [];
          console.log("res.data", typeof res.list, res.list);
          res.list.forEach((r) => {
            this.seloptions.push({
              value: r.value,
              label: r.label,
            });
          });
          console.log(this.seloptions);
        } else {
          console.log("res", res);
        }
      });
      console.log(this.seloptions);
    },
    handleSmallBlur() {
      console.log("开户行:", selvalue);
      let selvalue =
        this.smallForm.getFieldValue("bankName") || this.bank.bankName;
      if (selvalue) {
        let data = {
          bankCode: selvalue,
        };
        api.getBankArea(
          data,
          (res) => {
            console.log("res", res);
            if (res.code == "OK") {
              this.options3 = res.list;
            } else {
              console.log(res);
            }
          },
          (err) => {
            console.log(err);
          }
        );
      } else {
        // console.log("开户行为空", selvalue);
      }
    },
    bankNameSmallChange(value) {
      console.log(value);
      this.smallForm.setFieldsValue({
        bankName: value,
      });
      let data = {
        bankSuper: value,
      };
      api.getBankName(data, (res) => {
        console.log("res", res);
        if (res.code == "OK") {
          this.seloptions = [];
          console.log("res.data", typeof res.list, res.list);
          res.list.forEach((r) => {
            this.seloptions.push({
              value: r.value,
              label: r.label,
            });
          });
          console.log(this.seloptions);
        } else {
          console.log("res", res);
        }
      });
    },
    // 开户名称搜索
    bankNameSearch(value) {
      console.log(value);
      let data = {
        bankSuper: value,
      };
      api.getBankName(data, (res) => {
        console.log("res", res);
        if (res.code == "OK") {
          this.seloptions = [];
          console.log("res.data", typeof res.list, res.list);
          res.list.forEach((r) => {
            this.seloptions.push({
              value: r.value,
              label: r.label,
            });
          });
          console.log(this.seloptions);
        } else {
          console.log("res", res);
        }
      });
      console.log(this.seloptions);
    },
    bankNameChange(value) {
      console.log(value);
      this.form.setFieldsValue({
        bankName: value,
      });
      let data = {
        bankSuper: value,
      };
      api.getBankName(data, (res) => {
        console.log("res", res);
        if (res.code == "OK") {
          this.seloptions = [];
          console.log("res.data", typeof res.list, res.list);
          res.list.forEach((r) => {
            this.seloptions.push({
              value: r.value,
              label: r.label,
            });
          });
          console.log(this.seloptions);
        } else {
          console.log("res", res);
        }
      });
    },

    handleFocus() {
      console.log("focus");
    },
    handleBlur() {
      console.log("开户行:", selvalue);
      let selvalue = this.form.getFieldValue("bankName") || this.bank.bankName;
      if (selvalue) {
        let data = {
          bankCode: selvalue,
        };
        api.getBankArea(
          data,
          (res) => {
            console.log("res", res);
            if (res.code == "OK") {
              this.options3 = res.list;
            } else {
              console.log(res);
            }
          },
          (err) => {
            console.log(err);
          }
        );
      } else {
        // console.log("开户行为空", selvalue);
      }
    },
    validateOrgRegisterNo(rule, value, callback) {
      const form = this.form;
      let len = value.length;
      if (value && len != 18 && len != 15) {
        console.log("值存在");
        callback("您输入的社会统一信用代码有误！");
      } else {
        console.log("社会统一信用代码", value);
        this.payPassword = value;
      }
      callback();
    },
    validateIdentityNo(rule, value, callback) {
      const form = this.form;
      if (value && !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
        callback("您输入的身份证号码格式有误！");
      } else {
        console.log("身份证号码！", value);
      }
      callback();
    },
    imgClick(e) {
      // console.log(e.target.currentSrc)
      this.imageSrc = e.target.currentSrc;
      this.visible = true;
    },
    validateCode(rule, value, callback) {
      if (value && !/^1(3|4|5|6|7|8|9)\d{9}$/.test(value)) {
        this.phone = false;
        callback("您输入的手机号格式有误！");
        return;
      } else {
        if (!value) {
          this.phone = false;
        } else {
          this.phone = true;
          this.phonevalue = value;
        }
        callback();
      }
    },
    validateIdentityNo2(rule, value, callback) {
      const form = this.form;
      if (value && !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
        callback("您输入的身份证号码格式有误！");
      } else {
      }
      callback();
    },
    goModify() {
      let data = {
        mobileNo: this.bankCardDTO.mobileNo,
      };
      this.$axios
        .post("/agent/merchant/information/send/mobile/check", data)
        .then((res) => {
          console.log("sendmobile", res);
          if (res.data.code == "OK") {
            this.modalVisible = true;
          } else {
            this.$message.warning(res.data.message);
          }
        });
      // this.modalVisible = true;
    },
    orgSubmit(e) {
      e.preventDefault();
      this.modalForm.validateFields((err, values) => {
        if (!err) {
          let data = {
            mobileNo: this.bankCardDTO.mobileNo,
            verCode: this.query.verCode,
          };
          this.$axios
            .post("/agent/merchant/information/submit/checkCode", data)
            .then((res) => {
              console.log("sendmobile", res);
              if (res.data.code == "OK") {
                this.accountInfo = true;
                this.modalVisible = false;
                this.getAccountInfo();
              } else {
                this.$message.warning(res.data.message);
              }
            });
        }
      });
      // this.accountInfo = true;
      // this.modalVisible = false;
      //  this.getAccountInfo();
    },
    // 账户信息赋值
    getAccountInfo() {
      console.log(this.bankCardDTO.province);
      console.log(this.bankCardDTO.city);
      this.$nextTick(() => {
        this.form.setFieldsValue({
          //{}} -{{customerOrg.}} -{{customerOrg.}
          upload6: this.bankCardDTO.imgCardno, //银行正
          upload8: this.information.publicAccount, //账户证明
          // accountName: this.bankCardDTO.accountName, //账户名称
          bankName: this.bankCardDTO.bankName, //开户行名称
          bankaddress: [this.bankCardDTO.province, this.bankCardDTO.city], //开户行所在地
          bankBranchName: {
            value: this.bankCardDTO.bankNo,
            label: this.bankCardDTO.bankBranchName,
          }, //支行名称
          cardNo: this.bankCardDTO.cardNo, //账户
        });
        this.handleBlur()
        this.text2 = [this.bankCardDTO.province, this.bankCardDTO.city]
        this.addressBlur();
      });
      // var self = this;
      // let dataArr = [ this.bankCardDTO.province, this.bankCardDTO.city ];
      // console.log(dataArr);
      // setTimeout(function(){
      // self.$nextTick(() => {
      //   self.form.setFieldsValue({
      //     bankaddress: dataArr, //开户行所在地
      //   });
      // });
      // },10)

      if (this.bankCardDTO.isPrivate == false) {
        this.fileList4 = [
          //账户证明
          {
            uid: "4",
            name: "xxx.png",
            status: "done",
            url: "/file/file/download/" + this.information.publicAccount,
          },
        ];
      } else {
        this.fileList5 = [
          //银行卡正
          {
            uid: "7",
            name: "xxx.png",
            status: "done",
            url: "/file/file/download/" + this.bankCardDTO.imgCardno,
          },
        ];
        
      }
      if (!this.bankCardDTO.isPrivate) {
        this.tabShow = "1";
        this.getPubData();
      } else {
        if (this.information.legalPersonAccount) {
          this.tabShow = "2";
          this.getPriData();
        } else {
          this.tabShow = "3";
          this.getPriNotLegalData();
        }
      }
    },
    callback(key) {
      console.log(key);
      this.tabShow = key;
      if (key == "1") {
        this.fileList4 = [];
        this.getPubData();
      } else {
        this.isPrivate = true;
        this.fileList5 = [];
        if (key == "2") {
          console.log("2", key);
          this.getPriData();
        } else {
          this.getPriNotLegalData();
        }
      }
    },
    //卡号
    findCardBin() {
      if (!this.mer) {
        return;
      }
      let selvalue = this.form.getFieldValue("cardNo");
      console.log(selvalue);
      let isnum = /^\d+$/.test(selvalue);
      if (!isnum) {
        console.log("cg");
        return false;
      }
      this.$axios.get("/agent/card/bin/search/" + selvalue).then(
        (res) => {
          console.log("res", res);
          if (res.data.code == "OK") {
            this.cardType = res.data.data.cardtype;
          } else if (res.data.code == "NEED_LOGIN") {
          } else {
            // this.$message.warning("卡号有误！");
          }
        },
        (err) => {
          console.log(res);
        }
      );
    },
    //对公赋值
    getPubData() {
      this.isPrivate = false;
      this.bankCard.accountName = this.form.getFieldValue("merchantName")
        ? this.form.getFieldValue("merchantName")
        : this.information.merchantName;
      // const mobile = sessionStorage.getItem("mobile");
      this.$nextTick(() => {
        this.form.setFieldsValue({
          contactBusMobile: this.information.mobileNo,
          accountName: this.bankCardDTO.accountName,
        });
      });
    },
    //对私赋值
    getPriData() {
      this.isPrivate = true;
      this.legalPersonAccount = true;
      console.log(this.form.getFieldValue("identityNo"));
      this.bankCard.accountName = this.form.getFieldValue("identityName");
      this.idCard = this.form.getFieldValue("identityNo");
      this.$nextTick(() => {
        this.form.setFieldsValue({
          PrimobileNo: this.bankCardDTO.mobileNo,
        });
      });
    },
    getPriNotLegalData() {
      this.isPrivate = true;
      this.legalPersonAccount = false;
      console.log("12222222222224");
      if (
        this.cardHolderIdentityDTO.identityNo &&
        this.bankCardDTO.accountName &&
        this.bankCardDTO.mobileNo
      ) {
        console.log("1222222222222222222");
        this.$nextTick(() => {
          this.form.setFieldsValue({
            idCard: this.cardHolderIdentityDTO.identityNo,
            accountName: this.bankCardDTO.accountName,
            mobileNo: this.bankCardDTO.mobileNo,
          });
        });
      }
    },
    getFileDownload(value) {
      let data = value;
      api.getFilePath(
        data,
        (res) => {
          console.log(res);
          if (res.code == "OK") {
            const a = document.createElement("a");
            if (value == "merchant_service") {
              a.download = `特约商户服务协议.doc`;
            } else if (value == "entrust_income_auth") {
              a.download = `委托入款授权书.doc`;
            } else if (value == "entrust_auth") {
              a.download = `授权委托书.doc`;
            } else if (value == "merchant_imformation_modify") {
              a.download = `商户信息变更申请表.doc`;
            }
            let downloadUrl = "/file/file/download/" + res.data;
            a.href = downloadUrl;
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
          }
        },
        (err) => {
          console.log(err);
        }
      );
    },
    //以上
  },
};
</script>

<style lang="less" scoped>
span {
  cursor: pointer;
}

img {
  cursor: pointer;
}

.maininfochange {
  overflow: scroll;
  height: 100%;
  padding: 30px;
  overflow-x: hidden;
  overflow-y: auto;
}

.imgClass {
  vertical-align: middle;
  border-style: none;
  width: 100%;
}

.modalClass {
  overflow: hidden;
}

.ant-input {
  width: 50%;
}

.formGroupTitle {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: right;
}

// .formGroupTitle {
//   font-size: 20px;
//   font-weight: bold;

// }
.ant-tabs-nav {
  float: right;
}

.content4 {
  display: flex;
  margin-bottom: 20px;

  .conleft {
    font-size: 16px;
    font-weight: 600;
    width: 180px;
  }

  .conright {
    padding: 0 20px;

    span {
      margin-right: 20px;
    }
  }
}

.row-sty {
  margin-bottom: 20px;
}

.width-sty {
  width: 50%;
}

.w-sty {
  width: 60%;
}

.span-sty {
  display: block;
  text-align: center;
  padding-right: 8px;
  color: #999;
}

.p-sty {
  color: #999;
  padding-left: 30px;
  line-height: 30px;
}

.ant-card-head-title {
  padding: 12px 0 !important;
}

.ant-card-grid {
  padding: 12px;
}

.ant-card-head {
  background: transparent;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 24px;
  border-radius: 2px 2px 0 0;
  zoom: 1;
  margin-bottom: -1px;
  min-height: 45px !important;
  font-size: 16px;
  color: #52506b;
  font-weight: 400;
  display: flex;
}

.ant-card .ant-card-grid:nth-child(4n + 1),
.ant-card .ant-card-grid:nth-child(4n + 2) {
  background: #f7f9fc;
}

.ant-card-grid:hover {
  /* box-shadow: none; */
  box-shadow: 1px 0 0 0 #e8e8e8, 0 1px 0 0 #e8e8e8, 1px 1px 0 0 #e8e8e8,
    1px 0 0 0 #e8e8e8 inset, 0 1px 0 0 #e8e8e8 inset;
}

.card_sty {
  margin-bottom: 30px;
}

.ant-form-item {
  margin-bottom: 15px;
}

.tabClass_lf {
  width: 25%;
  text-align: left;
  padding-left: 20px;
}

.tabClass_rt {
  width: 75%;
  text-align: left;
  padding-left: 20px;
}

/deep/.ant-tabs-nav-scroll {
  text-align: center;
}
</style>